Create a web page presentation using R Markdown that features a plot created with Plotly. Host your webpage on either GitHub Pages, RPubs, or NeoCities. Your webpage must contain the date that you created the document, and it must contain a plot created with Plotly. We would love to see you show off your creativity! Review criteria
The rubric contains the following two questions:
Does the web page feature a date and is this date less than two months before the date that youโre grading this assignment? Is the web page a presentation and does it feature an interactive plot that appears to have been created with Plotly?
library(plotly)
## Loading required package: ggplot2
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
data(iris)
head(iris)
## Sepal.Length Sepal.Width Petal.Length Petal.Width Species
## 1 5.1 3.5 1.4 0.2 setosa
## 2 4.9 3.0 1.4 0.2 setosa
## 3 4.7 3.2 1.3 0.2 setosa
## 4 4.6 3.1 1.5 0.2 setosa
## 5 5.0 3.6 1.4 0.2 setosa
## 6 5.4 3.9 1.7 0.4 setosa
f <- list(
family = "Courier New, monospace",
size = 18,
color = "#7f7f7f"
)
x <- list(
title = "SeapalLeangth",
titlefont = f
)
y <- list(
title = "PetalLeangth",
titlefont = f
)
P<-plot_ly(y= iris$Petal.Leangth, x= iris$Sepal.Length,type = "scatter", mode="markers",color=iris$Species)
P <- P %>% layout(xaxis = x, yaxis = y)
P